package com.lancoo.klgcourseware.entity;


import android.text.TextUtils;

import java.util.List;

/**
 * Created by pengmi on 2018/11/7.
 * Description:词汇类知识点素材数据模型
 */

public class WordKnowledgeModel {

   //英式音标
    private String UN_phonetic;
   //英式音标音频路径
    private String UN_voice;
   //美式音标
    private String US_phonetic;
   //美式音标音频路径
    private String US_voice;
   //词性释义列表清单组合数据
    private List<WordExplainModel> ExplainList;
   //经典例句
    private String ClassicSen;
   //经典例句翻译
    private String ClassicTran;
   //经典例句音频路径
    private String ClassicVoice;

    public String getUN_phonetic() {
        return UN_phonetic;
    }

    public void setUN_phonetic(String UN_phonetic) {
        this.UN_phonetic = UN_phonetic;
    }

    public String getUN_voice() {
        if(!TextUtils.isEmpty(UN_voice)){
            UN_voice= UN_voice.replace("//////","/").replace("/////","/").replace("////","/").replace("///","/").replace("//","/");
            if(TextUtils.equals("/",UN_voice.substring(0,1))){
                UN_voice=UN_voice.substring(1);
            }
        }
        return UN_voice;
    }

    public void setUN_voice(String UN_voice) {
        this.UN_voice = UN_voice;
    }

    public String getUS_phonetic() {
        return US_phonetic;
    }

    public void setUS_phonetic(String US_phonetic) {
        this.US_phonetic = US_phonetic;
    }

    public String getUS_voice() {
        if(!TextUtils.isEmpty(US_voice)){
            US_voice= US_voice.replace("//////","/").replace("/////","/").replace("////","/").replace("///","/").replace("//","/");
            if(TextUtils.equals("/",US_voice.substring(0,1))){
                US_voice=US_voice.substring(1);
            }
        }
        return US_voice;
    }

    public void setUS_voice(String US_voice) {
        this.US_voice = US_voice;
    }

    public List<WordExplainModel> getExplainList() {
        return ExplainList;
    }

    public void setExplainList(List<WordExplainModel> explainList) {
        ExplainList = explainList;
    }

    public String getClassicSen() {
        if(!TextUtils.isEmpty(ClassicSen)){
            ClassicSen= ClassicSen.replace("//////","/").replace("/////","/").replace("////","/").replace("///","/").replace("//","/");
            if(TextUtils.equals("/",ClassicSen.substring(0,1))){
                ClassicSen=ClassicSen.substring(1);
            }
        }
        return ClassicSen;
    }

    public void setClassicSen(String classicSen) {
        ClassicSen = classicSen;
    }

    public String getClassicTran() {
        return ClassicTran;
    }

    public void setClassicTran(String classicTran) {
        ClassicTran = classicTran;
    }

    public String getClassicVoice() {
        if(!TextUtils.isEmpty(ClassicVoice)){
            ClassicVoice= ClassicVoice.replace("//////","/").replace("/////","/").replace("////","/").replace("///","/").replace("//","/");
            if(TextUtils.equals("/",ClassicVoice.substring(0,1))){
                ClassicVoice=ClassicVoice.substring(1);
            }
        }
        return ClassicVoice;
    }

    public void setClassicVoice(String classicVoice) {
        ClassicVoice = classicVoice;
    }
}
